package com.wxlgroup.springboot.dao;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.wxlgroup.springboot.entity.Department;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;

@Mapper
public interface DepartmentDao extends BaseMapper<Department> {


    //根据部门名称查询部门编号
    public Integer queryDepartmentIdByName(@Param("name") String name);

    //查询所有的部门信息
    public List<Department> queryAllDepartments(String departmentName) ;

    //根据部门编号查询对应部门拥有的员工数量
    public int countEmployees(int departmentId);

    //增加一个部门
    public int insertDepartment(Department department);

    //删除一个部门
    public int deleteDepartmentById(int departmentId);

    //修改部门信息
    public int updateDepartmentById(Department department);

    //查询所有的部门名称
    public List<String> queryAllDepartmentNames();


}
